Style Stud

integer channel = 72;

string style;
string button = "STYLE5";
string text; 
default
{
    touch_start(integer total_number)
    {
        if(style != "" && style != " ")
        {
            llSay(channel,"/ls style " + style);
            llMessageLinked(LINK_SET,1,style,NULL_KEY);
            llSetColor(<1,0,0>,ALL_SIDES);
        }
                 
        
    }
    link_message(integer sender,integer num,string msg,key id)
    {
        if(msg == "HIDE")
        {
            llSetAlpha(0,ALL_SIDES);
            llSetText("",<1,1,1>,1);
            state hidden;
        }
        if(msg != style && num == 1)
        {
            llSetColor(<1,1,1>,ALL_SIDES);
        }
        if(llGetSubString(msg,0,5) == button)
        {
            style = llGetSubString(msg,7,-1);
            if(style != "" && style != " ")
            {
                text = style + " Style";
                llSetText(text,<1,1,1>,1);
            }
            else
            {
                text = "";
                llSetText("",<1,1,1>,1);
            }
        }
    }
}

state hidden
{
    link_message(integer sender,integer num,string msg,key id)
    {
        if(msg == "SHOW")
        {
            llSetAlpha(1,ALL_SIDES);
            llSetText(text,<1,1,1>,1);
            state default;
        }

    }
}